import numpy as np

if __name__ == '__main__':
    # 零矩阵
    zeros_1d = np.zeros(3)
    print(zeros_1d)

    zeros_2d = np.zeros((3, 4))
    print(zeros_2d)

    zeros_3d = np.zeros((2, 3, 4))
    print(zeros_3d)

    # 全一矩阵
    ones_1d = np.ones(3)
    print(ones_1d)

    ones_2d = np.ones((3, 4))
    print(ones_2d)

    ones_3d = np.ones((2, 3, 4))
    print(ones_3d)

    twos_1d  = 2 * ones_1d
    print(twos_1d)
